package com.anysoft.ui.activity.web;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.webkit.WebView;

import com.anysoft.base.BaseWebViewActivity;
import com.anysoft.utils.HttpUtil;
import com.anysoft.utils.NetWorkUtil;
import com.anysoft.utils.StringUtil;

/**
 * Created by LiTingYao on 2018/7/7.
 *
 */
public class MentorZhiDaoGoutongActivity extends BaseWebViewActivity {
    
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String titleName = getIntent().getStringExtra("titleName");
        String params = getIntent().getStringExtra("params");
        title.setText(StringUtil.isEmpty(titleName) ? "" : titleName);
        if (StringUtil.isEmpty(params)) {
            loadUrl = generateUrl("mentorZhiDaoGoutong", HttpUtil.getCommonParams2StringByWeb(this));
        } else {
            loadUrl = generateUrl("mentorZhiDaoGoutong", HttpUtil.getCommonParams2StringByWeb(this) + "&" + params);
        }
        if (NetWorkUtil.isConnect(this)) {
            setWebViewConfig(loadUrl);
        }
        
    }
    
    @Override
    public void onshouldOverrideUrlLoadingCallBack(WebView webview, String url, String params) {
        webview.loadUrl(url);
    }
    
    @Override
    protected void onResume() {
        super.onResume();
    }
    
    @Override
    protected void onPause() {
        super.onPause();
    }
    
    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
